package cn.pengpeng.day05.join;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

public class JoinBean implements Writable {

	private String oderId;
	private String uid;
	private String uname;
	private int age;
	private String lover;
	private String tableName;

	public void set(String oderId, String uid, String uname, int age, String lover,String tableName) {
		this.oderId = oderId;
		this.uid = uid;
		this.uname = uname;
		this.age = age;
		this.lover = lover;
		this.tableName = tableName;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getOderId() {
		return oderId;
	}

	public void setOderId(String oderId) {
		this.oderId = oderId;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getLover() {
		return lover;
	}

	public void setLover(String lover) {
		this.lover = lover;
	}

	@Override
	public void write(DataOutput out) throws IOException {
		out.writeUTF(this.oderId);
		out.writeUTF(this.uid);
		out.writeUTF(this.uname);
		out.writeInt(this.age);
		out.writeUTF(this.lover);
		out.writeUTF(this.tableName);
	}

	@Override
	public void readFields(DataInput in) throws IOException {
		this.oderId = in.readUTF();
		this.uid = in.readUTF();
		this.uname = in.readUTF();
		this.age = in.readInt();
		this.lover = in.readUTF();
		this.tableName = in.readUTF();
	}

	@Override
	public String toString() {
		return "[oderId=" + oderId + ", uid=" + uid + ", uname=" + uname + ", age=" + age + ", lover=" + lover
				+ "]";
	}
	
	

}
